<<<<<<< HEAD
//二维数组的使用
=======
//打印二维数组并排序

# include<stdio.h>
# include<string.h>

int main (void)
{
    char a[][20] = {"ddd","zzz","ggg","bbb","ccc","aaa"};
    int i,j;
    int n = sizeof(a)/sizeof(a[0]);
    char *tmp = NULL;
    
    for (i = 0; i < n; i++)
    {
        for(j = i+1;j < n;j++)
        {
            if(strcmp(a[i],a[j]))
            {
                tmp = a[i];
                a[i] = a[j];
                a[j] = tmp;
            }
        }
    }
    for(i = 0;i<n;i++)
    {
        printf ("%s\n",a[i]);
    }
    return 0;
}
>>>>>>> origin/master
